package com.shiwaixiangcun.customer.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.shiwaixiangcun.customer.R;
import com.shiwaixiangcun.customer.entity.MyPropertyEntity;

import java.util.List;

/**
 * Author   Administrator
 * Date     2018/4/10
 * Desc     eg
 *
 * @author Administrator
 */
public class AdapterMultiPayment extends BaseQuickAdapter<MyPropertyEntity, BaseViewHolder> {
    public AdapterMultiPayment(@Nullable List<MyPropertyEntity> data) {
        super(R.layout.item_multi_payment, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MyPropertyEntity item) {
        helper.setText(R.id.tv_property_name, item.getHouseNumDesc());
        if ("0.00".equals(item.getUnclearAmount())) {
            helper.setText(R.id.tv_fee_status, "已结清");
        } else {
            helper.setText(R.id.tv_fee_status, "已欠费 " + item.getUnclearAmount() + " 元");
        }
    }
}
